package io.renren.modules.sys.service.impl;

import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.sys.dao.JxLaboratoryManagerDao;
import io.renren.modules.sys.entity.JxLaboratoryManagerEntity;
import io.renren.modules.sys.service.JxLaboratoryManagerService;


@Service("jxLaboratoryManagerService")
public class JxLaboratoryManagerServiceImpl extends ServiceImpl<JxLaboratoryManagerDao, JxLaboratoryManagerEntity> implements JxLaboratoryManagerService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<JxLaboratoryManagerEntity> page = this.page(
                new Query<JxLaboratoryManagerEntity>().getPage(params),
                new QueryWrapper<JxLaboratoryManagerEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public JxLaboratoryManagerEntity getlaboratoryId(Long jxLaboratoryId) {
        Map<String,Object>  params=new HashMap<String,Object>();
        params.put("laboratoryId",jxLaboratoryId);
        return this.baseMapper.getMangerByPO(params);
    }
}
